package org.linloong.modules.apis.common.enmus;

public enum ModelEnum {

    GCZP_MODEL("gczp", "桉树中径材用材林栽培模式"),
    LXTZ_MODEL("lxtz", "桉树大径材用材林栽培模式"),
    HJZP_MODEL("hjzp", "混交栽培模式");
    private final String code;
    private final String name;
    ModelEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    // 通过code 获取name
    public static String getNameByCode(String code) {
        for (ModelEnum modelEnum : ModelEnum.values()) {
            if (modelEnum.getCode().equals(code)) {
                return modelEnum.getName();
            }
        }
        return null;
    }

    private String getCode() {
        return code;
    }
     private String getName() {
        return name;
    }

}
